import * as AntdIcons from '@ant-design/icons-vue'
import localIconsName from 'virtual:svg-icons-names'
const AntdIconList: string[] = []

export const ANT_ICON_PREFIX = 'ant-icon-';
export const LOCAL_ICON_PREFIX = 'local-icon-'

// 打印第一个图标组件的信息
const firstIcon = Object.values(AntdIcons)[0]
console.log('First Icon Component:', firstIcon)

for (const [, component] of Object.entries(AntdIcons)) {
    if (component.displayName) {
        AntdIconList.push(`${ANT_ICON_PREFIX}${component.displayName}`)
    }
}

export function getAntdIconList() {
    return AntdIconList
}

export function getLocalIconNames() {
    return localIconsName
}
